{template '../header'}

<form action="/search">
    <input type="text" name="keywords" value="{$keywords}" required placeholder="请输入关键字">
    <button>搜索</button>
</form>

<div>
    <span>热词：</span>
    {loop $hotwords $hotword}
    <a href="/cms/search/index/keywords/{$hotword['title']}">{$hotword['title']}</a> &nbsp;
    {/loop}
</div>

<div>
    <span>导航：</span>
    {loop $navs $nav}
    <a href="{$nav['url']}">{$nav['title']}</a>
        {loop $nav['children'] $children_nav}
        <a href="{$children_nav['url']}">{$children_nav['title']}</a>
        {/loop}
    {/loop}
</div>

<div>
    <span>公告：</span>
    {loop $events $event}
    <a href="/cms/event/page/id/{$event['id']}">{$event['title']}</a> &nbsp;
    {/loop}
</div>

<div>
    <span>轮播图：</span>
    {loop $banners $banner}
    <a href="{$banner['url']}" title="{$banner['title']}"><img src="{$banner['image']}" /></a> &nbsp;
    {/loop}
</div>

<div>
    <div>各栏目推荐：</div>
    {loop $columns $column}
    <span>栏目：</span>
    <a href="/cms/article/index/id/{:$column->getData('id')}">{:$column->getData('title')}</a> &nbsp;
    <div>
        {loop $columns_hots[$column->getData('id')] $column_hot}
        <div>
            <a href="/cms/article/page/id/{$column_hot['id']}">{$column_hot['title']}</a> &nbsp;
        </div>
        {/loop}
    </div>
    {/loop}
</div>

<div>
    <span>最近更新：</span>
    {loop $newests $newest}
    <div>
        <a href="/cms/article/page/id/{$newest['id']}">{$newest['title']}</a> &nbsp;
    </div>
    {/loop}
</div>

<div>
    <span>友情链接：</span>
    {loop $links $link}
    <a href="{$link['url']}" title="{$link['title']}"><img src="{$link['thumb']}" /></a> &nbsp;
    {/loop}
</div>

<div>
    <span>合作伙伴：</span>
    {loop $friends $friend}
    <a href="{$friend['url']}" title="{$friend['title']}"><img src="{$friend['thumb']}" /></a> &nbsp;
    {/loop}
</div>


<div>
    <span>标签：</span>
    {loop $tags $tag}
    <a href="/cms/article/tag/tag/{$tag['id']}">{$tag['title']}</a> &nbsp;
    {/loop}
</div>

{template '../footer'}
